home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Compilers⁄Interps
/
kevoSource
/
portGlobal.c
< prev
next >
Wrap
Text File
|
1993-05-14
|
3KB
|
102 lines
/* Kevo -- a prototype-based object-oriented language */
/* (c) Antero Taivalsaari 1991-1993 */
/* Some parts (c) Antero Taivalsaari 1986-1988 */
/* portGlobal.c: Non-portable global variables */
#include "global.h"
#include "portGlobal.h"
/* These variables are used in menus to set certain modes on/off (see 'doFlags()') */
int cooperativeFlag = 0;
int traceFlag = 0;
/*
These variables designate the currently active task, and TE (TextEdit)
on the screen.
*/
TASK** theTask;
TEHandle theText;
/*
Safe memory fetch operation. Masks out bus errors arising from
references to illegal memory addresses.
*/
int maskedFetch(address)
int* address;
{
if ((int)address < lowMemLimit || (int)address > highMemLimit) return NIL;
else return(*address);
}
/* Latest event noticed by Macintosh */
EventRecord theEvent;
int eventSlice = 1; /* How much other Mac tasks will receive time */
int eventDelay = 4; /* How long do we wait until events will be checked again */
int nextTime = 0; /* Stores the next event loop call time */
/* The last time when the event loop has been invoked.
This variable is used to avoid the user interface from getting stuck.
*/
int lastEventTime;
/* Standard window size rectangle */
Rect standardRect;
/* Window dragging and growing limit */
Rect limitRect;
/* User interface mode (GUIShell or GUIBrowse) */
int GUIMode;
/* Browser variables */
TASK** browserTask = NIL; /* The browser task */
int browserCount = 0; /* How many browsers are open currently */
WindowPtr LastBrowser = NIL; /* The latest opened browser in the system */
/* Icon list management variables */
int MaskedPairs; /* How many pairs is there in the current browser */
int AnonymousSlots; /* How many anonymous (array) slots - " - */
int CellsInTotal; /* How many cells/icons in total is - " - */
/* Information for CUTting, COPYing, and PASTEin pairs from one browser to another */
LIST* ClipList; /* Stores the pairs */
OBJECT* ClipObject; /* Stores the owner of the pairs */
CONTEXT* ClipContext; /* Original (unmodified) context of the source object */
int ClipMode; /* Clipping mode (CLIP_CUT, CLIP_COPY, CLIP_REMOVE) */
/* Modification menu flag fields */
int whoToModify = THIS_ONLY; /* Editing only one object or the whole clone family? */
/* The menus */
MenuHandle appleMenu;
MenuHandle fileMenu;
MenuHandle windowMenu;
/* Shell-specific menus */
MenuHandle edit1Menu;
MenuHandle tasksMenu;
MenuHandle multitaskMenu;
MenuHandle debugMenu;
/* Browser-specific menus */
MenuHandle edit2Menu;
MenuHandle viewMenu;
MenuHandle toolsMenu;